<#if parentId?has_content>
	<@_content id=parentId>
		<#assign parent=object/>
	</@_content>
</#if>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" method="post">
		<#include "../include_page/paramters.html"/>
		<div class="searchBar">
			<ul class="searchContent">
				<li class="width:auto">
					<#include "../include_page/status.html"/>
				</li>
				<li class="colspan">
					<label>发布日期:</label>
					<input type="text" name="startPublishDate" size="15" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" value="${startPublishDate!}" />
					<span>-</span>
					<input type="text" name="endPublishDate" size="15" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" value="${endPublishDate!}" />
				</li>
				<li>
					<label>标题:</label><input type="text" size="20" name="title" value="${title!}" />
				</li>
				<li style="width:auto">
					<label>模型:</label>
					<#include "../include_page/modelId.html"/>
				</li>
			</ul>
			<div class="subBar">
				<ul>
					<li>
						<button type="submit" class="buttonActive">搜索</button>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<#if parent?has_content>
				<li><a href="myself/contentList.html?parentId=${(parent.parentId)!}" target="navTab" rel="myself/contentList"><i class="icon-circle-arrow-up icon-large"></i> 返回上一级</a></li>
				<li class="line">line</li>
			</#if>
			<li><a href="cmsContent/add.html?id={sid}&navTabId=myself/contentList" target="navTab" rel="myself/contentList/edit"><i class="icon-edit icon-large"></i> 修改内容</a></li>
			<li><a href="cmsContent/delete.do" title="确定要删除这些记录么?"  target="selectedTodo" rel="ids"><i class="icon-trash icon-large"></i> 批量删除</a></li>
			<li class="line">line</li>
			<li><a href="cmsContent/refresh.do" title="确定要刷新这些记录么?"  target="selectedTodo" rel="ids"><i class="icon-refresh icon-large"></i> 批量刷新</a></li>
			<li><a href="cmsContent/publish.do" title="确定要生成这些记录么?"  target="selectedTodo" rel="ids"><i class="icon-file-text-alt icon-large"></i> 批量生成</a></li>
		</ul>
	</div>
<@_contentList advanced=true status=status modelId=modelId parentId=parentId emptyParent=true title=title userId=admin.id 
			startPublishDate=startPublishDate endPublishDate=endPublishDate 
			orderField=orderField orderType=orderType pageIndex=pageNum count=numPerPage>
	<table class="list" width="100%" layoutH="92">
		<thead>
			<tr>
				<th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="30">ID</th>
				<th width="250">标题</th>
				<th width="30">分类</th>
				<th width="30">模型</th>
				<th width="30" orderField="scores" class="<#if orderField??&&'scores'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">分数</th>
				<th width="30" orderField="comments" class="<#if orderField??&&'comments'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">评论数</th>
				<th width="30" orderField="clicks" class="<#if orderField??&&'clicks'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">点击数</th>
				<th width="70" orderField="publishDate" class="<#if orderField??&&'publishDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">发布日期</th>
				<th width="70">创建日期</th>
				<th width="50">状态/审核用户</th>
				<th width="40">操作</th>
			</tr>
		</thead>
		<tbody>
			<#list page.list as a>
				<@t.merge 'checkUserIds' a.checkUserId!/>
				<@t.merge 'categoryIds' a.categoryId!/>
				<@t.merge 'modelIds' a.modelId!/>
			</#list>
			
			<@_sysUser ids=t.checkUserIds!><#assign checkUserMap=map!/></@_sysUser>
			<@_category ids=t.categoryIds!><#assign categoryMap=map!/></@_category>
			<@_model ids=t.modelIds!><#assign modelMap=map!/></@_model>
			
			<#list page.list as a>
			<tr target="sid" rel="${a.id}">
				<td><input name="ids" value="${a.id}" type="checkbox"></td>
				<td>${a.id}</td>
				<td>${(a.copied?then('[转载]',''))!}<a href="${a.url!}" target="_blank">${(a.title?html)!}</a></td>
				<td>
					<a href="myself/contentList.html?categoryId=${a.categoryId}&navTabId=myself/contentList" target="navTab" rel="myself/contentList" title="我的内容">
						${(categoryMap[a.categoryId?string].name?html)!}
					</a>
				</td>
				<td>
					<a href="myself/contentList.html?modelId=${a.modelId}&navTabId=myself/contentList" target="navTab" rel="myself/contentList" title="我的内容">
						${(modelMap[a.modelId?string].name?html)!}
					</a>
				</td>
				<td>${a.scores!}</td>
				<td>${a.comments!}</td>
				<td>${a.clicks!}</td>
				<td>${a.publishDate!}</td>
				<td>${a.createDate!}</td>
				<td>
					<@t.m 'status.content.'+a.status/>
					<#if 2==a.status>/${(checkUserMap[a.checkUserId?string].nickName)!}</#if>
				</td>
				<td>
					<#if modelMap[a.modelId?string].hasChild>
						<a href="myself/contentList.html?parentId=${a.id}" target="navTab" rel="myself/contentList">子内容管理</a>
					</#if>
					<#if 1==a.status>
						<a href="cmsContent/push.html?contentId=${a.id}" target="dialog" rel="push">推荐</a>
					</#if>
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	<#include "../include_page/page.html"/>
</@_contentList>
</div>